import req from "@/uni-sdk/request/request.js";

const Api = {
	actPage: "mall-ums/app-api/v1/activity-details/page",
	actDetail: "mall-ums/app-api/v1/activity-details/detail",
	joinAct: "mall-ums/app-api/v1/activity-details/join-activity",
	couponPage: "mall-ums/app-api/v1/coupons/list",
};

export function getActPage(params){
	return req.commonGet(Api.actPage, params, false);
}

export function getActDetail(id){
	return req.commonGet(Api.actDetail, { id }, true);
}

export function joinAct(id, communityId){
	return req.commonPost(Api.joinAct, {id, communityId}, true);
}

export function getCouponPage(params){
	return req.commonGet(Api.couponPage, params, false);
}